package com.huluobo.a2203kotlinshopping.RoomDemo

import android.content.Context
import androidx.room.Room

/**
 *  Created by LC on 2024/6/21.
 */
object AppDBUtils {
    private lateinit var database: LoginDatabase

    fun init(context: Context) {
        database = Room.databaseBuilder(context, LoginDatabase::class.java, "loginDb.db")
            .allowMainThreadQueries()
            .build()
    }

    fun getDb(): LoginDatabase = database
}